* allout-widgets.el (allout-widgets-post-command-business): Stop decorating
authorKen Manheimer <ken.manheimer@gmail.com>
Sun, 26 Jun 2011 16:47:39 +0000 (12:47 -0400)
committerKen Manheimer <ken.manheimer@gmail.com>
Sun, 26 Jun 2011 16:47:39 +0000 (12:47 -0400)
intermediate isearch matches.  They're not being undecorated when an
isearch is continued past, and isearch automatically collapses them.  This
leads to "widget leaks", where decorated items accumulate in collapsed
areas.  Lines with lots of hidden widgets can slow down cursor travel,
substantially.  Too much complicated machinery would be needed to ensure
undecoration, so we're doing without this nicety.

(allout-widgets-tally-string): Don't try to do a hash-table-count of
allout-widgets-tally when it's nil.  This eliminates spurious "Error during
redisplay: (wrong-type-argument hash-table-p nil)" warnings in *Messages*
when allout-widgets-maintain-tally is t.

lisp/ChangeLog
lisp/allout-widgets.el

index 0a7ed1d67fd1e2d344ace5441014095ed77f8791..5aec2a8f7ee34b88958d18d3eccd66eb63b2bb41 100644 (file)
@@ -1,10 +1,26 @@
+2011-06-26  Ken Manheimer  <ken.manheimer@gmail.com>
+
+       * allout-widgets.el (allout-widgets-post-command-business): Stop
+       decorating intermediate isearch matches.  They're not being
+       undecorated when an isearch is continued past, and isearch
+       automatically collapses them.  This leads to "widget leaks", where
+       decorated items accumulate in collapsed areas.  Lines with lots of
+       hidden widgets can slow down cursor travel, substantially.  Too
+       much complicated machinery would be needed to ensure undecoration,
+       so we're doing without this nicety.
+
+       (allout-widgets-tally-string): Don't try to do a hash-table-count
+       of allout-widgets-tally when it's nil.  This eliminates spurious "Error
+       during redisplay: (wrong-type-argument hash-table-p nil)" warnings in
+       *Messages* when allout-widgets-maintain-tally is t.
+
 2011-06-26  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-normalize-argument): Rename to
        display-buffer-normalize-arguments.  Handle special meaning of
-       LABEL argument.  Respect special-display-function when popping
-       up a new frame.  Fix code searching for a window showing the
-       buffer on another frame.
+       LABEL argument.  Respect special-display-function when popping up
+       a new frame.  Fix code searching for a window showing the buffer
+       on another frame.
        (display-buffer-normalize-specifiers): Call
        display-buffer-normalize-arguments.
        (display-buffer-in-window): Don't undedicate the window if its
        * iswitchb.el (iswitchb-window-buffer-p): Use `member' instead of
        `memq' (Bug#8799).
 
+>>>>>>> MERGE-SOURCE
 2011-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * subr.el (make-progress-reporter): Add "..." by default (bug#8785).
index 647b609288d853c8a56fce5c5cc3b48a2cbdc491..0f1fe8501233855738a7cd314c0da2dbda601fd2 100644 (file)
@@ -258,7 +258,9 @@ widgets are locally inhibited.
 
 The number varies according to the evanescence of objects on a
  hash table with weak keys, so tracking of widget erasures is often delayed."
-  (when (and allout-widgets-maintain-tally (not allout-widgets-mode-inhibit))
+  (when (and allout-widgets-maintain-tally
+             (not allout-widgets-mode-inhibit)
+             allout-widgets-tally)
     (format ":%s" (hash-table-count allout-widgets-tally))))
 ;;;_   = allout-widgets-track-decoration nil
 (defcustom allout-widgets-track-decoration nil
@@ -748,20 +750,23 @@ Optional RECURSING is for internal use, to limit recursion."
                     (message replaced-message)
                   (message "")))))
 
-        ;; Detect undecorated items, eg during isearch into previously
-        ;; unexposed topics, and decorate "economically".  Some
-        ;; undecorated stuff is often exposed, to reduce lag, but the
-        ;; item containing the cursor is decorated.  We constrain
-        ;; recursion to avoid being trapped by unexpectedly undecoratable
-        ;; items.
-        (when (and (not recursing)
-                   (not (allout-current-decorated-p))
-                   (or (not (equal (allout-depth) 0))
-                       (not allout-container-item-widget)))
-          (let ((buffer-undo-list t))
-            (allout-widgets-exposure-change-recorder
-             allout-recent-prefix-beginning allout-recent-prefix-end nil)
-            (allout-widgets-post-command-business 'recursing)))
+        ;; alas, decorated intermediate matches are not easily undecorated
+        ;; when they're automatically rehidden by isearch, so we're
+        ;; dropping this nicety.
+        ;; ;; Detect undecorated items, eg during isearch into previously
+        ;; ;; unexposed topics, and decorate "economically".  Some
+        ;; ;; undecorated stuff is often exposed, to reduce lag, but the
+        ;; ;; item containing the cursor is decorated.  We constrain
+        ;; ;; recursion to avoid being trapped by unexpectedly undecoratable
+        ;; ;; items.
+        ;; (when (and (not recursing)
+        ;;            (not (allout-current-decorated-p))
+        ;;            (or (not (equal (allout-depth) 0))
+        ;;                (not allout-container-item-widget)))
+        ;;   (let ((buffer-undo-list t))
+        ;;     (allout-widgets-exposure-change-recorder
+        ;;      allout-recent-prefix-beginning allout-recent-prefix-end nil)
+        ;;     (allout-widgets-post-command-business 'recursing)))
 
         ;; Detect and rectify fouled outline structure - decorated item
         ;; not at beginning of line.